package com.hangwei.paperless.adapter;

import android.support.annotation.Nullable;
import android.view.View;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseViewHolder;
import com.facebook.drawee.view.SimpleDraweeView;
import com.hangwei.paperless.R;
import com.twelve.all.adapter.MyAdapter;
import com.twelve.all.net.API;

import java.util.List;

/**
 * Created by 张龙臣 on 2020/10/23.
 */

public class HorizontalPicAdapter extends MyAdapter<String, BaseViewHolder> {

    public HorizontalPicAdapter( @Nullable List<String> data) {
        super(R.layout.item_pic, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, String item) {
        SimpleDraweeView simpleDraweeView = helper.itemView.findViewById(R.id.sdv);
//        ImageView imageView = helper.itemView.findViewById(R.id.ivScan);
        simpleDraweeView.setImageURI(API.BASE_URL + item);
        helper.addOnClickListener(R.id.sdv);
//        imageView.setOnClickListener(new View.OnClickListener() {
//            @Override
//            public void onClick(View v) {
//            }
//        });
    }

}
